<?php
if (isset($_POST['ok'])) {
    require_once 'classes/ask.class.php';
    $ask = new Ask($_POST['askid']);
    $ask->isFinished(1);
    require_once 'classes/feedback.class.php';
    require_once 'classes/work.class.php';
    $work = new Work($ask->getWorkId());
    $feed = new FeedBack($work->getId(), $_POST['quality'], $_POST['speed'], $_POST['comment'], $_SESSION['uid']);


    unset($ask);
    unset($work);
    unset($feed);
    unset($user);
    unset($cat);
}
?>
<div class="alert-message success">
  <p><strong>Congratulations!</strong> Your feedback has been sent.</p>
</div>
<h4>Your rating</h4>
<table cellpadding="0" cellspacing="0" style="width:200px;">
            <tr>
                <td style="padding:3px 3px 3px 6px;margin:0;width: 50px">Speed</td>
                <td style="padding:3px 3px 3px 6px;;margin:0">
                    <?php
                    for ($c = 0; $c < $_POST['speed']; $c++)
                        echo "<img style='width:16px;' src='star_48.png'/>";
                    $left = 5 - $c;
                    for ($a = 0; $a < $left; $a++)
                        echo "<img style='width:16px;' src='star_off_48.png'/>";
                    $s = 0;
                    ?>
                </td>
            </tr>
            <tr>
                <td style="padding:3px 3px 3px 6px;margin:0">
                    Quality 
                </td>
                <td style="padding:3px 3px 3px 6px;;margin:0">
                    <?php
                    for ($c = 0; $c < $_POST['quality']; $c++)
                        echo "<img style='width:16px;' src='star_48.png'/>";
                    $left = 5 - $c;
                    for ($a = 0; $a < $left; $a++)
                        echo "<img style='width:16px;' src='star_off_48.png'/>";
                    $c = 0;
                    ?>
                </td>
            </tr>
        </table>

<blockquote>
  <p><?php echo $_POST['comment'] ?></p>
  <small>Your comment</small>
</blockquote>